package com.atguigu.springcloud.config.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lenovo
 * @version 1.0
 * @date 2020/12/18 16:58
 */
@RefreshScope
@RestController
public class ConfigClientController {


    @Value("${server.port}")
    private Integer port;

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String getConfigInfo() {
        return "端口：【" + port + "】，内容：" + configInfo;
    }

}
